package com.yonyou.cyxdms.basedata.service.entity.questionaire;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 问卷
 * </p>
 *
 * @author renwd
 * @since 2019-09-19
 */
@TableName("tm_questionnaire")
public class QuestionnairePO extends DMSBasePO<QuestionnairePO> {

    private static final long serialVersionUID = 1L;

    /**
     * 问卷ID
     */
    @TableId(value = "QUESTIONNAIRE_ID", type = IdType.AUTO)
    private Long questionnaireId;

    @TableField("APP_ID")
    private String appId;

    /**
     * 公司代码
     */
    @TableField("COMPANY_CODE")
    private String companyCode;
    /**
     * 所有者代码
     */
    @TableField("OWNER_CODE")
    private String ownerCode;
    /**
     * 所有者的父组织代码（用于二网使用）
     */
    @TableField("OWNER_PAR_CODE")
    private String ownerParCode;
    /**
     * 问卷编码
     */
    @TableField("QUESTIONNAIRE_CODE")
    private String questionnaireCode;
    /**
     * 问卷类型(1572)
     */
    @TableField("QUESTIONNAIRE_TYPE")
    private Integer questionnaireType;
    /**
     * 问卷类型OLD
     */
    @TableField("QUESTIONNAIRE_TYPE_OLD")
    private String questionnaireTypeOld;
    /**
     * 问卷名称
     */
    @TableField("QUESTIONNAIRE_NAME")
    private String questionnaireName;
    /**
     * 问卷制作时间
     */
    @TableField("QUESTIONNAIRE_DATE")
    private LocalDateTime questionnaireDate;
    /**
     * 是否启用
     */
    @TableField("IS_VALID")
    private Integer isValid;
    /**
     * 数据来源(1045)
     */
    @TableField("DATA_SOURCES")
    private Integer dataSources;
    /**
     * 来源ID
     */
    @TableField("SOURCE_ID")
    private Long sourceId;
    /**
     * 来源日期
     */
    @TableField("SOURCE_CHANGED_AT")
    private LocalDateTime sourceChangedAt;

    public QuestionnairePO() {
        super();
    }


    public Long getQuestionnaireId() {
        return questionnaireId;
    }

    public void setQuestionnaireId(Long questionnaireId) {
        this.questionnaireId = questionnaireId;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getCompanyCode() {
        return companyCode;
    }

    public void setCompanyCode(String companyCode) {
        this.companyCode = companyCode;
    }

    public String getOwnerCode() {
        return ownerCode;
    }

    public void setOwnerCode(String ownerCode) {
        this.ownerCode = ownerCode;
    }

    public String getOwnerParCode() {
        return ownerParCode;
    }

    public void setOwnerParCode(String ownerParCode) {
        this.ownerParCode = ownerParCode;
    }

    public String getQuestionnaireCode() {
        return questionnaireCode;
    }

    public void setQuestionnaireCode(String questionnaireCode) {
        this.questionnaireCode = questionnaireCode;
    }

    public Integer getQuestionnaireType() {
        return questionnaireType;
    }

    public void setQuestionnaireType(Integer questionnaireType) {
        this.questionnaireType = questionnaireType;
    }

    public String getQuestionnaireTypeOld() {
        return questionnaireTypeOld;
    }

    public void setQuestionnaireTypeOld(String questionnaireTypeOld) {
        this.questionnaireTypeOld = questionnaireTypeOld;
    }

    public String getQuestionnaireName() {
        return questionnaireName;
    }

    public void setQuestionnaireName(String questionnaireName) {
        this.questionnaireName = questionnaireName;
    }

    public LocalDateTime getQuestionnaireDate() {
        return questionnaireDate;
    }

    public void setQuestionnaireDate(LocalDateTime questionnaireDate) {
        this.questionnaireDate = questionnaireDate;
    }

    public Integer getIsValid() {
        return isValid;
    }

    public void setIsValid(Integer isValid) {
        this.isValid = isValid;
    }

    public Integer getDataSources() {
        return dataSources;
    }

    public void setDataSources(Integer dataSources) {
        this.dataSources = dataSources;
    }

    public Long getSourceId() {
        return sourceId;
    }

    public void setSourceId(Long sourceId) {
        this.sourceId = sourceId;
    }

    public LocalDateTime getSourceChangedAt() {
        return sourceChangedAt;
    }

    public void setSourceChangedAt(LocalDateTime sourceChangedAt) {
        this.sourceChangedAt = sourceChangedAt;
    }

    @Override
    protected Serializable pkVal() {
        return this.questionnaireId;
    }

    @Override
    public String toString() {
        return "QuestionnairePO{" +
                "questionnaireId=" + questionnaireId +
                "appId=" + appId +
                ", companyCode=" + companyCode +
                ", ownerCode=" + ownerCode +
                ", ownerParCode=" + ownerParCode +
                ", questionnaireCode=" + questionnaireCode +
                ", questionnaireType=" + questionnaireType +
                ", questionnaireTypeOld=" + questionnaireTypeOld +
                ", questionnaireName=" + questionnaireName +
                ", questionnaireDate=" + questionnaireDate +
                ", isValid=" + isValid +
                ", dataSources=" + dataSources +
                ", sourceId=" + sourceId +
                ", sourceChangedAt=" + sourceChangedAt +
                "}";
    }

}
